package com.huawei.appmarket.service.store.awk.card;

import android.content.Context;
import android.text.TextUtils;
import android.view.View;
import android.widget.LinearLayout;
import com.huawei.appgallery.foundation.card.base.card.BaseDistCard;
import com.huawei.appgallery.foundation.ui.framework.cardkit.bean.CardBean;
import com.huawei.appmarket.service.appdetail.bean.detail.DetailWatchCardBean;
import o.azb;
import o.cgz;
import o.ewm.j;

public class DetailWatchGeneralCard extends BaseDistCard {
    private LinearLayout ʼ;
    private LinearLayout ˋ;

    public /* synthetic */ cgz ˏ(View view) {
        return ॱ(view);
    }

    public DetailWatchGeneralCard(Context context) {
        super(context);
    }

    public DetailWatchGeneralCard ॱ(View view) {
        azb.ˏ(view);
        this.ˋ = (LinearLayout) view.findViewById(j.ᐝꞌ);
        this.ʼ = (LinearLayout) view.findViewById(j.ᐝﾟ);
        ʽ(view);
        return this;
    }

    public void ˏ(CardBean cardBean) {
        DetailWatchCardBean detailWatchCardBean = (DetailWatchCardBean) cardBean;
        if (detailWatchCardBean == null) {
            return;
        }
        if (!TextUtils.isEmpty(detailWatchCardBean.ˊ()) || !TextUtils.isEmpty(detailWatchCardBean.ॱ())) {
            ˎ(this.ˋ, detailWatchCardBean.ˊ());
            ˎ(this.ʼ, detailWatchCardBean.ॱ());
        }
    }

    private void ˎ(View view, String str) {
        if (view != null) {
            if (TextUtils.isEmpty(str)) {
                view.setVisibility(8);
            } else {
                view.setVisibility(0);
            }
        }
    }
}
